#include <iostream>
#include "HDF5DataSetObject.h"
#include "HDF5GroupObject.h"
using namespace std;

class Matrix:public CHDF5GroupObject
{
public:
	Matrix(int rows,int cols, double d );
	~Matrix();

	void printMatrix();

	virtual int read(const H5std_string& filename,const H5std_string& location,const H5std_string& groupName);
	virtual int write(const H5std_string& filename,const H5std_string& location,const H5std_string& groupName);
	virtual int append(const H5std_string& filename,const H5std_string& location,const H5std_string& groupName);

	void writeData(const H5std_string& location, const H5std_string& dataSetName);
	void appendData(const H5std_string& location, const H5std_string& dataSetName);
	void readData(const H5std_string& location, const H5std_string& dataSetName);

private:
	static int RANK;
	int rowN;
	int colN;

	//string dataSetName;
	//string groupName;

	int size;
	double* data;
	hsize_t* dims;
	CHDF5DataSetObject* hdf5DataSet;

	static H5std_string ROW_NUM;
	static H5std_string COL_NUM;
};